<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<script>
$(function(){
	$('#download').click(function(){
		document.downloadForm.submit();
	});
	$('#send').click(function(){
		var err='';
		if(document.batchForm.file.value==''){
			err+='请选择上传的档案\r\n';
		}
		if(document.batchForm.comment.value==''){
			err+='请填立单原因描述\r\n';
		}
		if(err!=''){
			alert(err);
		}else{
			document.batchForm.submit();
		}
	});
});
</script>
<h1>断／缺货工单整批建立

</h1>
<form name="batchForm" action="/ecadmin/cs/outOfStockBatch.do" method="POST" enctype="multipart/form-data" >
<table class="tb-1">
<tr>
<th style="width:250px">订单及商品代码(<a id="download" href="#">格式下载</a>)：</th>
<td style="text-align:left">
<input type="file" name="file"/>
</td>
</tr>
<tr>
<th>
断／缺货原因：</th><td style="text-align:left">
<select name="reason">
				
				
					<option value="00">前台客人取消</option>
				
					<option value="10">供应商缺货</option>
				
					<option value="30">惡意訂單(地址 電話亂填)</option>
				
				</select>
</td>
</tr>
<tr>
<th>立单原因描述：</th>
<td style="text-align:left">
<textarea name="comment" rows="5" cols="50"></textarea>
</td>
</tr>
<tr>
<td>
</td>
<td style="text-align:left">
<input type="button" id="send" value="送出"/>
<input type="reset" id="reset" value="重置"/>

</td>
</tr>
</table>
</form>
<form name="downloadForm" method="post" action="/ecadmin/jsp/downloadOrderList.jsp">
<input type="hidden" name="file" value="orderIdAndProductId.txt"/>
<textarea name="content" style="display:none"><%="orderId1 productId1,productId2\r\norderId2 productId3\r\norderId3 productId4"%></textarea>
</form>